.class final Lcom/ninesky/browser/ap;
.super Landroid/webkit/WebChromeClient;


# instance fields
.field final synthetic a:Lcom/ninesky/browser/n;


# direct methods
.method constructor <init>(Lcom/ninesky/browser/n;)V
    .locals 0

    iput-object p1, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-direct {p0}, Landroid/webkit/WebChromeClient;-><init>()V

    return-void
.end method


# virtual methods
.method public final getDefaultVideoPoster()Landroid/graphics/Bitmap;
    .locals 2

    iget-object v0, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-static {}, Lcom/ninesky/browser/TabControl;->a()Lcom/ninesky/browser/TabControl;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/ninesky/browser/TabControl;->b(Lcom/ninesky/browser/n;)Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-static {v0}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;)Lcom/ninesky/browser/BrowserActivity;

    move-result-object v0

    invoke-virtual {v0}, Lcom/ninesky/browser/BrowserActivity;->o()Landroid/graphics/Bitmap;

    move-result-object v0

    :goto_0
    return-object v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public final getVideoLoadingProgressView()Landroid/view/View;
    .locals 2

    iget-object v0, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-static {}, Lcom/ninesky/browser/TabControl;->a()Lcom/ninesky/browser/TabControl;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/ninesky/browser/TabControl;->b(Lcom/ninesky/browser/n;)Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-static {v0}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;)Lcom/ninesky/browser/BrowserActivity;

    move-result-object v0

    invoke-virtual {v0}, Lcom/ninesky/browser/BrowserActivity;->p()Landroid/view/View;

    move-result-object v0

    :goto_0
    return-object v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public final getVisitedHistory(Landroid/webkit/ValueCallback;)V
    .locals 2

    new-instance v0, Lcom/ninesky/browser/aa;

    invoke-direct {v0, p0, p1}, Lcom/ninesky/browser/aa;-><init>(Lcom/ninesky/browser/ap;Landroid/webkit/ValueCallback;)V

    const/4 v1, 0x0

    new-array v1, v1, [Ljava/lang/Void;

    invoke-virtual {v0, v1}, Landroid/os/AsyncTask;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    return-void
.end method

.method public final onCloseWindow(Landroid/webkit/WebView;)V
    .locals 0

    return-void
.end method

.method public final onConsoleMessage(Landroid/webkit/ConsoleMessage;)Z
    .locals 1

    const/4 v0, 0x1

    return v0
.end method

.method public final onCreateWindow(Landroid/webkit/WebView;ZZLandroid/os/Message;)Z
    .locals 3

    invoke-static {}, Lcom/ninesky/browser/TabControl;->a()Lcom/ninesky/browser/TabControl;

    move-result-object v0

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/ninesky/browser/TabControl;->a(Z)Lcom/ninesky/browser/n;

    move-result-object v1

    if-eqz v1, :cond_0

    const-string v0, "about:blank"

    invoke-virtual {v1, v0}, Lcom/ninesky/browser/n;->b(Ljava/lang/String;)V

    iget-object v0, p4, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v0, Landroid/webkit/WebView$WebViewTransport;

    invoke-static {v1}, Lcom/ninesky/browser/n;->c(Lcom/ninesky/browser/n;)Landroid/webkit/WebView;

    move-result-object v2

    invoke-virtual {v0, v2}, Landroid/webkit/WebView$WebViewTransport;->setWebView(Landroid/webkit/WebView;)V

    invoke-virtual {p4}, Landroid/os/Message;->sendToTarget()V

    iget-object v0, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-static {v0}, Lcom/ninesky/browser/n;->d(Lcom/ninesky/browser/n;)Landroid/os/Handler;

    move-result-object v0

    new-instance v2, Lcom/ninesky/browser/ae;

    invoke-direct {v2, p0, v1}, Lcom/ninesky/browser/ae;-><init>(Lcom/ninesky/browser/ap;Lcom/ninesky/browser/n;)V

    invoke-virtual {v0, v2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    invoke-super {p0, p1, p2, p3, p4}, Landroid/webkit/WebChromeClient;->onCreateWindow(Landroid/webkit/WebView;ZZLandroid/os/Message;)Z

    move-result v0

    goto :goto_0
.end method

.method public final onExceededDatabaseQuota(Ljava/lang/String;Ljava/lang/String;JJJLandroid/webkit/WebStorage$QuotaUpdater;)V
    .locals 8

    invoke-static {}, Lcom/ninesky/browser/setting/a;->q()Lcom/ninesky/browser/setting/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/ninesky/browser/setting/a;->j()Lcom/ninesky/browser/setting/e;

    move-result-object v0

    move-wide v1, p3

    move-wide v3, p5

    move-wide v5, p7

    move-object/from16 v7, p9

    invoke-virtual/range {v0 .. v7}, Lcom/ninesky/browser/setting/e;->a(JJJLandroid/webkit/WebStorage$QuotaUpdater;)V

    return-void
.end method

.method public final onGeolocationPermissionsHidePrompt()V
    .locals 0

    return-void
.end method

.method public final onGeolocationPermissionsShowPrompt(Ljava/lang/String;Landroid/webkit/GeolocationPermissions$Callback;)V
    .locals 0

    return-void
.end method

.method public final onHideCustomView()V
    .locals 2

    iget-object v0, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-static {}, Lcom/ninesky/browser/TabControl;->a()Lcom/ninesky/browser/TabControl;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/ninesky/browser/TabControl;->b(Lcom/ninesky/browser/n;)Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-static {v0}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;)Lcom/ninesky/browser/BrowserActivity;

    move-result-object v0

    invoke-virtual {v0}, Lcom/ninesky/browser/BrowserActivity;->f()V

    :cond_0
    return-void
.end method

.method public final onProgressChanged(Landroid/webkit/WebView;I)V
    .locals 3

    const/16 v0, 0x64

    if-ne p2, v0, :cond_0

    invoke-static {}, Landroid/webkit/CookieSyncManager;->getInstance()Landroid/webkit/CookieSyncManager;

    move-result-object v0

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Landroid/webkit/CookieSyncManager;->sync()V

    :cond_0
    iget-object v0, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-static {}, Lcom/ninesky/browser/TabControl;->a()Lcom/ninesky/browser/TabControl;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/ninesky/browser/TabControl;->b(Lcom/ninesky/browser/n;)Z

    move-result v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-static {v0}, Lcom/ninesky/browser/n;->e(Lcom/ninesky/browser/n;)I

    move-result v0

    if-eq v0, p2, :cond_1

    iget-object v0, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-static {v0, p2}, Lcom/ninesky/browser/n;->b(Lcom/ninesky/browser/n;I)V

    iget-object v0, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-static {v0}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;)Lcom/ninesky/browser/BrowserActivity;

    move-result-object v0

    iget-object v1, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-static {}, Lcom/ninesky/browser/TabControl;->a()Lcom/ninesky/browser/TabControl;

    move-result-object v2

    invoke-virtual {v2, v1}, Lcom/ninesky/browser/TabControl;->a(Lcom/ninesky/browser/n;)I

    move-result v1

    invoke-virtual {v0, v1, p2}, Lcom/ninesky/browser/BrowserActivity;->a(II)V

    :cond_1
    return-void
.end method

.method public final onReachedMaxAppCacheSize(JJLandroid/webkit/WebStorage$QuotaUpdater;)V
    .locals 6

    invoke-static {}, Lcom/ninesky/browser/setting/a;->q()Lcom/ninesky/browser/setting/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/ninesky/browser/setting/a;->j()Lcom/ninesky/browser/setting/e;

    move-result-object v0

    move-wide v1, p1

    move-wide v3, p3

    move-object v5, p5

    invoke-virtual/range {v0 .. v5}, Lcom/ninesky/browser/setting/e;->a(JJLandroid/webkit/WebStorage$QuotaUpdater;)V

    return-void
.end method

.method public final onReceivedIcon(Landroid/webkit/WebView;Landroid/graphics/Bitmap;)V
    .locals 3

    if-eqz p2, :cond_0

    iget-object v0, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-static {v0}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;)Lcom/ninesky/browser/BrowserActivity;

    move-result-object v0

    invoke-virtual {v0}, Lcom/ninesky/browser/BrowserActivity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    invoke-virtual {p1}, Landroid/webkit/WebView;->getOriginalUrl()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p1}, Landroid/webkit/WebView;->getUrl()Ljava/lang/String;

    move-result-object v2

    invoke-static {v0, v1, v2, p2}, Lcom/ninesky/browser/du;->a(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Landroid/graphics/Bitmap;)V

    :cond_0
    iget-object v0, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-static {}, Lcom/ninesky/browser/TabControl;->a()Lcom/ninesky/browser/TabControl;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/ninesky/browser/TabControl;->b(Lcom/ninesky/browser/n;)Z

    return-void
.end method

.method public final onReceivedTitle(Landroid/webkit/WebView;Ljava/lang/String;)V
    .locals 4

    const-string v0, "NSBrowser.Tab"

    const-string v1, "onReceivedTitle --------------------------------------------"

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    invoke-static {}, Lcom/ninesky/browser/setting/a;->q()Lcom/ninesky/browser/setting/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/ninesky/browser/setting/a;->e()Z

    move-result v0

    if-eqz v0, :cond_2

    invoke-virtual {p1}, Landroid/webkit/WebView;->getUrl()Ljava/lang/String;

    move-result-object v0

    const-string v1, "NSBrowser.Tab"

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "url = "

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    const-string v1, "NSBrowser.Tab"

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "title = "

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    const-string v1, "http://gate.baidu.com"

    invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-virtual {v0}, Lcom/ninesky/browser/n;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v1, 0x7f070059

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getText(I)Ljava/lang/CharSequence;

    move-result-object v0

    invoke-virtual {p2, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_1

    invoke-virtual {p1}, Landroid/webkit/WebView;->stopLoading()V

    iget-object v0, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-static {v0}, Lcom/ninesky/browser/n;->d(Lcom/ninesky/browser/n;)Landroid/os/Handler;

    move-result-object v0

    new-instance v1, Lcom/ninesky/browser/ad;

    invoke-direct {v1, p0}, Lcom/ninesky/browser/ad;-><init>(Lcom/ninesky/browser/ap;)V

    invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    :cond_0
    :goto_0
    return-void

    :cond_1
    iget-object v0, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    iget-object v1, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    iget-object v1, v1, Lcom/ninesky/browser/n;->a:Ljava/lang/String;

    invoke-static {v0, v1}, Lcom/ninesky/browser/n;->b(Lcom/ninesky/browser/n;Ljava/lang/String;)V

    :goto_1
    iget-object v0, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-static {v0, p2}, Lcom/ninesky/browser/n;->e(Lcom/ninesky/browser/n;Ljava/lang/String;)V

    iget-object v0, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    const/16 v1, 0x20

    invoke-static {v0, v1}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;I)V

    invoke-virtual {p1}, Landroid/webkit/WebView;->getUrl()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v1

    const v2, 0xc350

    if-ge v1, v2, :cond_0

    new-instance v1, Lcom/ninesky/browser/ac;

    invoke-direct {v1, p0, v0, p2}, Lcom/ninesky/browser/ac;-><init>(Lcom/ninesky/browser/ap;Ljava/lang/String;Ljava/lang/String;)V

    const/4 v0, 0x0

    new-array v0, v0, [Ljava/lang/Void;

    invoke-virtual {v1, v0}, Lcom/ninesky/browser/ac;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    goto :goto_0

    :cond_2
    iget-object v0, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-virtual {p1}, Landroid/webkit/WebView;->getUrl()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/ninesky/browser/n;->b(Lcom/ninesky/browser/n;Ljava/lang/String;)V

    goto :goto_1
.end method

.method public final onReceivedTouchIconUrl(Landroid/webkit/WebView;Ljava/lang/String;Z)V
    .locals 5

    const/4 v4, 0x0

    iget-object v0, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-static {v0}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;)Lcom/ninesky/browser/BrowserActivity;

    move-result-object v0

    invoke-virtual {v0}, Lcom/ninesky/browser/BrowserActivity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    if-eqz p3, :cond_0

    iget-object v1, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    iget-object v1, v1, Lcom/ninesky/browser/n;->b:Lcom/ninesky/browser/ck;

    if-eqz v1, :cond_0

    iget-object v1, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    iget-object v1, v1, Lcom/ninesky/browser/n;->b:Lcom/ninesky/browser/ck;

    invoke-virtual {v1, v4}, Lcom/ninesky/browser/ck;->cancel(Z)Z

    iget-object v1, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    const/4 v2, 0x0

    iput-object v2, v1, Lcom/ninesky/browser/n;->b:Lcom/ninesky/browser/ck;

    :cond_0
    iget-object v1, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    iget-object v1, v1, Lcom/ninesky/browser/n;->b:Lcom/ninesky/browser/ck;

    if-nez v1, :cond_1

    iget-object v1, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    new-instance v2, Lcom/ninesky/browser/ck;

    iget-object v3, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-direct {v2, v3, v0, p1}, Lcom/ninesky/browser/ck;-><init>(Lcom/ninesky/browser/n;Landroid/content/ContentResolver;Landroid/webkit/WebView;)V

    iput-object v2, v1, Lcom/ninesky/browser/n;->b:Lcom/ninesky/browser/ck;

    iget-object v0, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    iget-object v0, v0, Lcom/ninesky/browser/n;->b:Lcom/ninesky/browser/ck;

    const/4 v1, 0x1

    new-array v1, v1, [Ljava/lang/String;

    aput-object p2, v1, v4

    invoke-virtual {v0, v1}, Lcom/ninesky/browser/ck;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    :cond_1
    return-void
.end method

.method public final onRequestFocus(Landroid/webkit/WebView;)V
    .locals 2

    iget-object v0, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-static {}, Lcom/ninesky/browser/TabControl;->a()Lcom/ninesky/browser/TabControl;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/ninesky/browser/TabControl;->b(Lcom/ninesky/browser/n;)Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-static {}, Lcom/ninesky/browser/TabControl;->a()Lcom/ninesky/browser/TabControl;

    move-result-object v0

    iget-object v1, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-virtual {v0, v1}, Lcom/ninesky/browser/TabControl;->d(Lcom/ninesky/browser/n;)V

    :cond_0
    return-void
.end method

.method public final onSelectionDone(Landroid/webkit/WebView;)V
    .locals 0

    return-void
.end method

.method public final onSelectionStart(Landroid/webkit/WebView;)V
    .locals 0

    return-void
.end method

.method public final onShowCustomView(Landroid/view/View;Landroid/webkit/WebChromeClient$CustomViewCallback;)V
    .locals 2

    iget-object v0, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-static {}, Lcom/ninesky/browser/TabControl;->a()Lcom/ninesky/browser/TabControl;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/ninesky/browser/TabControl;->b(Lcom/ninesky/browser/n;)Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-static {v0}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;)Lcom/ninesky/browser/BrowserActivity;

    move-result-object v0

    invoke-virtual {v0, p1, p2}, Lcom/ninesky/browser/BrowserActivity;->a(Landroid/view/View;Landroid/webkit/WebChromeClient$CustomViewCallback;)V

    :cond_0
    return-void
.end method

.method public final openFileChooser(Landroid/webkit/ValueCallback;)V
    .locals 2

    iget-object v0, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-static {}, Lcom/ninesky/browser/TabControl;->a()Lcom/ninesky/browser/TabControl;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/ninesky/browser/TabControl;->b(Lcom/ninesky/browser/n;)Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/ninesky/browser/ap;->a:Lcom/ninesky/browser/n;

    invoke-static {v0}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;)Lcom/ninesky/browser/BrowserActivity;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/ninesky/browser/BrowserActivity;->a(Landroid/webkit/ValueCallback;)V

    :goto_0
    return-void

    :cond_0
    const/4 v0, 0x0

    invoke-interface {p1, v0}, Landroid/webkit/ValueCallback;->onReceiveValue(Ljava/lang/Object;)V

    goto :goto_0
.end method
